package com.xxxy;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.management.monitor.Monitor;
@RestController
public class MonitorBlockHandler {
    @GetMapping("/monitor/block")
    @SentinelResource(value = "helloResource", blockHandler = "helloBlockHandler",
    blockHandlerClass = MonitorBlockHandler.class)
            public String hello(){
        return "hello sentinel";
    }

}
